﻿using RestSharp;
using RestSharp.Authenticators;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WpfRedis.Common
{
    public class RestClientBase  : RestClient,IRestClient
    {
        private Uri _BaseUrl = new Uri("http://localhost:8095/");

        public override Uri BaseUrl 
        {
            get => _BaseUrl; set => _BaseUrl = value; 
        }

    }
    public class Authenticator : IAuthenticator
    {
        public void Authenticate(IRestClient client, IRestRequest request)
        {
            request.AddHeader("auth", "jhecis");
        }
    }
}
